<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>兼职管理</title>
</head>
<body>
    <div id="partjob_toolbar" class="search-div" style="margin: 10px 10px 40px">
        <!-- 查询条件区域 -->
        <div class="search-content">
            <span>
                <label>标题：</label>
                <input type="text" name="rulesTitle"  class="span2" />
                &nbsp;<i class="boot_icon-question-sign" selectLike="tooltip"></i>
            </span>
            <span>
                <label>类型：</label>
                <select name="rulesTypeid" style="width: 110px;">
                    <option value="">==请选择==</option>
                </select>
            </span>
        </div>
        <!-- 功能区域 -->
        <div class="search-toolbar" >
            <span style="float:left;">
                <a class="easyui-linkbutton clearDgChecked" icon="icon-redo" plain="true"  title="清空所有勾选项" >清空勾选</a>
                <a  class="easyui-linkbutton" icon="icon-add" plain="true" title="添加兼职"  id="partjob_add" ><span>添加兼职 </span></a>
                <a class="easyui-linkbutton" icon="icon-edit" plain="true" title="修改兼职" id="partjob_update" ><span>修改兼职</span></a>
                <a class="easyui-linkbutton" icon="icon-remove"	plain="true" title="确定要删除吗?"  id="partjob_delete"><span>批量删除</span></a>
            </span>
            <span style="float:right">
                <button class="btn btn-primary btn-small" type="submit">查询</button>&nbsp;
                <button class="btn btn-small clear" type="button" >清空</button>&nbsp;
            </span>
        </div>
    </div>
    <table id="partjob_dg"></table>

    <!--增加兼职弹窗-->
    <div id="partjob_add_dialog"></div>

    <!--修改弹窗-->
    <div id="partjob_update_dialog"></div>

    <!--删除弹窗-->
    <div id="partjob_delete_dialog"></div>
    <script>
        $(function () {
            //数据查询
            $('#partjob_dg').datagrid({
                url:'testJson/partjob_json.json',
                frozenColumns:[[
                    {
                        field:"id",
                        title : "勾选",
                        checkbox:true
                    }
                ]],
                columns:[[
                    {field:'code',title:'编号',width:100},
                    {field:'name',title:'发布者',width:100},
                    {field:'company',title:'公司/商家名称',width:100},
                    {field:'location',title:'地点',width:100},
                    {field:'job_type',title:'兼职类型',width:100},
                    {field:'pay',title:'工资',width:100},
                    {field:'',title:'',width:100,align:'right'},
                    {
                        field : "delete",
                        title : "操作",
                        align:"center",
                        width : 100,
                        formatter: function(value,row,index){
                            return '<a  href="#">删除</a>';
                        }
                    } ,
                ]]
            });

            //2.点击事件：增加数据，点击增加按钮时
            $("#partjob_add").on("click",function () {
                //1.jq创建一个弹窗,对应<div id="user_add_dialog"></div>，id选择器关联
                $('#partjob_add_dialog').dialog({
                    title: '增加兼职数据',
                    width: 600,
                    height: 400,
                    closed: false,
                    cache: false,
                    href: 'page/partjob/partjob_add.html',//2.弹窗的页面
                    modal: true
                });
            });
            //2.点击事件：修改数据，点击修改按钮时
            $("#partjob_update").on("click",function () {
                //1.jq创建一个弹窗,对应<div id="user_add_dialog"></div>，id选择器关联
                $('#partjob_update_dialog').dialog({
                    title: '修改兼职数据',
                    width: 600,
                    height: 400,
                    closed: false,
                    cache: false,
                    href: 'page/partjob/portjob_update.html',//2.弹窗的页面
                    modal: true
                });
            });
            //2.点击事件：删除数据，点击删除按钮时
            $("#partjob_delete").on("click",function () {
                //1.jq创建一个弹窗,对应<div id="user_add_dialog"></div>，id选择器关联
                $('#partjob_delete_dialog').dialog({
                    title: '删除兼职数据',
                    width: 600,
                    height: 400,
                    closed: false,
                    cache: false,
                    href: 'page/partjob/partjob_delete.html',//2.弹窗的页面
                    modal: true
                });
            });




        });

    </script>

</body>
</html>